.class public Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;
.super Lcom/waiqin365/lightapp/base/WqBaseActivity;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private a:Landroid/widget/TextView;

.field private b:Landroid/widget/TextView;

.field private c:Landroid/widget/ImageView;

.field private d:Landroid/widget/ImageView;

.field private e:Luk/co/senab/photoview/PhotoView;

.field private f:Landroid/widget/Button;

.field private g:Ljava/io/File;

.field private h:Z


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Lcom/waiqin365/lightapp/base/WqBaseActivity;-><init>()V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->h:Z

    return-void
.end method

.method private a(Ljava/lang/String;)D
    .locals 6

    const-wide/high16 v4, 0x4059000000000000L    # 100.0

    new-instance v2, Ljava/io/File;

    invoke-direct {v2, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    const-wide/16 v0, 0x0

    invoke-virtual {v2}, Ljava/io/File;->isFile()Z

    move-result v3

    if-eqz v3, :cond_0

    :try_start_0
    new-instance v3, Ljava/io/FileInputStream;

    invoke-direct {v3, v2}, Ljava/io/FileInputStream;-><init>(Ljava/io/File;)V

    invoke-virtual {v3}, Ljava/io/InputStream;->available()I
    :try_end_0
    .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1

    move-result v0

    int-to-double v0, v0

    :cond_0
    :goto_0
    const-wide/high16 v2, 0x4130000000000000L    # 1048576.0

    div-double/2addr v0, v2

    mul-double/2addr v0, v4

    double-to-int v0, v0

    int-to-double v0, v0

    div-double/2addr v0, v4

    return-wide v0

    :catch_0
    move-exception v2

    invoke-virtual {v2}, Ljava/io/FileNotFoundException;->printStackTrace()V

    goto :goto_0

    :catch_1
    move-exception v2

    invoke-virtual {v2}, Ljava/io/IOException;->printStackTrace()V

    goto :goto_0
.end method

.method static synthetic a(Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;)Luk/co/senab/photoview/PhotoView;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->e:Luk/co/senab/photoview/PhotoView;

    return-object v0
.end method

.method private a()V
    .locals 2

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string/jumbo v1, "cameraFile"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Ljava/io/File;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->g:Ljava/io/File;

    return-void
.end method

.method static synthetic b(Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;)Ljava/io/File;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->g:Ljava/io/File;

    return-object v0
.end method

.method private b()V
    .locals 4

    const v0, 0x7f0c070f

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->c:Landroid/widget/ImageView;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->c:Landroid/widget/ImageView;

    invoke-virtual {v0, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0c0711

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->a:Landroid/widget/TextView;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->a:Landroid/widget/TextView;

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    const v2, 0x7f0802fa

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const v0, 0x7f0c07e3

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->b:Landroid/widget/TextView;

    const v0, 0x7f0c07e2

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->d:Landroid/widget/ImageView;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->d:Landroid/widget/ImageView;

    invoke-virtual {v0, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0c07e0

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Luk/co/senab/photoview/PhotoView;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->e:Luk/co/senab/photoview/PhotoView;

    const v0, 0x7f0c07e4

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    iput-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->f:Landroid/widget/Button;

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->f:Landroid/widget/Button;

    invoke-virtual {v0, p0}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->g:Ljava/io/File;

    invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/fiberhome/gaea/client/d/k;->i(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->e:Luk/co/senab/photoview/PhotoView;

    const v1, 0x7f020250

    invoke-virtual {v0, v1}, Luk/co/senab/photoview/PhotoView;->setImageResource(I)V

    :goto_0
    return-void

    :cond_0
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    new-instance v1, Lcom/waiqin365/lightapp/im/gallery/b;

    invoke-direct {v1, p0}, Lcom/waiqin365/lightapp/im/gallery/b;-><init>(Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;)V

    const-wide/16 v2, 0x1f4

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    goto :goto_0
.end method

.method static synthetic c(Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;)Landroid/content/Context;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->mContext:Landroid/content/Context;

    return-object v0
.end method


# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 4

    const v2, 0x7f08060e

    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    sparse-switch v0, :sswitch_data_0

    :goto_0
    return-void

    :sswitch_0
    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->back()V

    goto :goto_0

    :sswitch_1
    iget-boolean v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->h:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->d:Landroid/widget/ImageView;

    const v1, 0x7f02005e

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->b:Landroid/widget/TextView;

    invoke-virtual {p0, v2}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->h:Z

    goto :goto_0

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->d:Landroid/widget/ImageView;

    const v1, 0x7f020061

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

    iget-object v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->b:Landroid/widget/TextView;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {p0, v2}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, ":"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, "("

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->g:Ljava/io/File;

    invoke-virtual {v2}, Ljava/io/File;->getPath()Ljava/lang/String;

    move-result-object v2

    invoke-direct {p0, v2}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->a(Ljava/lang/String;)D

    move-result-wide v2

    invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(D)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string/jumbo v2, "MB)"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->h:Z

    goto :goto_0

    :sswitch_2
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    const-string/jumbo v1, "cameraFile"

    iget-object v2, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->g:Ljava/io/File;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    const-string/jumbo v1, "isOriginal"

    iget-boolean v2, p0, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->h:Z

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    const/4 v1, -0x1

    invoke-virtual {p0, v1, v0}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->setResult(ILandroid/content/Intent;)V

    invoke-virtual {p0}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->back()V

    goto :goto_0

    :sswitch_data_0
    .sparse-switch
        0x7f0c070f -> :sswitch_0
        0x7f0c07e2 -> :sswitch_1
        0x7f0c07e4 -> :sswitch_2
    .end sparse-switch
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 1

    invoke-super {p0, p1}, Lcom/waiqin365/lightapp/base/WqBaseActivity;->onCreate(Landroid/os/Bundle;)V

    invoke-static {p0}, Lcom/fiberhome/gaea/client/d/a;->b(Landroid/app/Activity;)V

    const v0, 0x7f030164

    invoke-virtual {p0, v0}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->setContentView(I)V

    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->a()V

    invoke-direct {p0}, Lcom/waiqin365/lightapp/im/gallery/GalleryCameraReviewActivity;->b()V

    return-void
.end method
